A conventional virtual machine manager (VMM) may run on a computer to present the abstraction of one or more virtual machines (VMs) or guests to other software. Each VM may function as a self-contained platform that runs its own software stack, including an operating system (OS) and applications. Collectively this software stack is referred to as “guest software.” Guest software running on a VM expects to operate as if it were running on a dedicated computer. For example, the guest software expects to control various computer operations and have access to physical (i.e., hardware) resources during these operations. The physical resources may include processor-resident resources, such as control registers, resources that reside in memory, such as descriptor tables, and devices on the hosting hardware platform, such as IO devices. In a VM environment, the VMM has ultimate control over the hardware resources. In order to provide protection from and between VMs, the VMM typically virtualizes hardware resources. This may include intercepting and arbitrating accesses to hardware resources made by the guest software.
Virtualization of hardware resources requires frequent virtualization intercepts of access requests from the guest software to provide host emulation of guest instructions that access virtualized processor and platform resources. Virtualization intercepts frequently require guest software switches, which cause an address space switch from the guest space to the host space or an address space switch from guest space to another guest space. A table in the processor called the translation look-aside buffer (TLB) may be used to store information about pages in memory the processor has accessed. The TLB cross-references a program's virtual memory address with its corresponding physical memory address. The TLB enables faster computing by allowing address processing to take place independent of the normal address-translation pipeline. During virtualization however, the TLB needs to be flushed during context switches between VMs as each VM may have entries in the TLB that may conflict with entries corresponding to other VMs. TLB flushes are a major source of guest software switch overhead as they add significant warm-up costs for caching guest virtual address to host physical address translation after guest space switch.